fix(platform-ios): clear graceful shutdown timer#167
Draft
V3RON wants to merge 2 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this?
This PR fixes iOS Harness test runs lingering for roughly 30 seconds after the XCTest agent has already shut down successfully. The graceful-shutdown path used nested
Promise.racecalls with referenced timeout promises; when the protocol shutdown andxcodebuildexit won those races, the losing timers remained active until their 30-second deadlines.How does it work?
The platform-iOS shutdown path now owns one local cancellable timeout and clears it in
finallywhenever the race settles. The change stays local to the package—no shared utility is extracted—and preserves the existing sequence: requestclient.shutdown(), wait for thexcodebuildprocess task to exit, then use the sharedterminate()helper only as fallback.A fake-timer regression test verifies that successful protocol shutdown invokes the shutdown request, avoids process termination, and leaves no active timer. Validation covered a forced platform-Apple build with dependencies, platform-Apple typechecking and linting, the full platform-iOS suite (60 tests across 11 files), and the focused XCTest-agent suite (18 tests); commit and push hooks also passed their affected-project typecheck, lint, and build checks.
Why is this useful?
Successful iOS test runs can exit promptly instead of waiting for a stale 30-second timer, while retaining graceful XCTest/
xcodebuildteardown and the established SIGTERM/SIGKILL fallback for genuine shutdown failures.